package com.wanmait.happyheating.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

/**
* Created by Mybatis Generator 2021/05/10
 * 4545
*/
@Data
@TableName(value = "admin")
public class Admin implements Serializable {
     @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 真实姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 分配的账号
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 密码
     */
    @TableField(value = "pass")
    private String pass;

    /**
     * 头像
     */
    @TableField(value = "profile")
    private String profile;

    /**
     * 手机
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 类型id
     */
    @TableField(value = "admin_type_id")
    private Integer adminTypeId;
    @TableField(exist = false)
    private AdminType adminType;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Timestamp updateTime;

    /**
     * 最后登录时间
     */
    @TableField(value = "last_login_time")
    private Timestamp lastLoginTime;


    /**
     * 登录次数
     */
    @TableField(value = "login_count")
    private Integer loginCount;

    /**
     * 录入时间
     */
    @TableField(value = "input_time")
    private Timestamp inputTime;

    /**
     * 1为存在 0为不存在
     */
    @TableLogic
    @TableField(value = "enable")
    private Boolean enable;

    private static final long serialVersionUID = 1L;

    public static final String COL_NAME = "name";

    public static final String COL_USER_NAME = "user_name";

    public static final String COL_PASS = "pass";

    public static final String COL_PROFILE = "profile";

    public static final String COL_PHONE = "phone";

    public static final String COL_ADMIN_TYPE_ID = "admin_type_id";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_LAST_LOGIN_TIME = "last_login_time";

    public static final String COL_LOGIN_IP = "login_ip";

    public static final String COL_LOGIN_COUNT = "login_count";

    public static final String COL_INPUT_TIME = "input_time";

    public static final String COL_ENABLE = "enable";

}